<?php
/**
 * PHP Framework Domain Model common includes
 *
 * @author Andrew <andrew@vitche.com>
 * @author Frozen Rain <frozenrain@mail.ru>
 **/

// Namespace
ClassRegistrar::attach('Framework.DomainModel', '');

// Classes
ClassRegistrar::attach('Framework.DomainModel', 'Entity');
ClassRegistrar::attach('Framework.DomainModel', 'EntityCondition');
ClassRegistrar::attach('Framework.DomainModel', 'EntityType');
ClassRegistrar::attach('Framework.DomainModel', 'Storage');

function __autoload($name) {

    global $root;
    $strFileName = $root . '/' . $name . '.php';
    $strCode = '<?php class ' . $name .' extends Entity {} ?>';
    file_put_contents($strFileName, $strCode);
    require_once($strFileName);
}
?>